import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;


public class LiczbaTest {
	
	Liczba a = null;
	Liczba b = null;

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
		
		a = null;
		b = null;
		
	}

	@Test(expected=LiczbaException.class)
	public void testLiczbaInt() throws LiczbaException{
				
		try
		{			
			b = new Liczba(8);
			assertNotNull("Failure",b);
			a = new Liczba(8);
			assertNotSame(a,b);
		}
		catch (Exception ex){fail("Nieoczekiwany wyjatek");}
		
		a = new Liczba(-2);
	}

	@Test
	public void testZapis() {
		try
		{
			
			a = new Liczba(8);
			assertEquals("Failure","1000",a.zapis(2));
			b = new Liczba(10);
			assertTrue("Failure","A".compareTo(b.zapis(16))==0);
			
		}
		catch (Exception ex)
		{
			fail("Zly wyjatek");
		}
	}
	
	@Ignore
	@Test(timeout=200)
	public void SlimakTest(){}

}
